3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines for getting and setting characteristics that define how a shader affects a surface.
You can use the Q3Shader_GetUVTransform function to get the current transform in uv parametric space.
TQ3Status Q3Shader_GetUVTransform (
TQ3ShaderObject shader,
TQ3Matrix3x3 *uvTransform);
You can use the Q3Shader_SetUVTransform function to set the transform in uv parametric space.
TQ3Status Q3Shader_SetUVTransform (
TQ3ShaderObject shader,
const TQ3Matrix3x3 *uvTransform);
The Q3Shader_SetUVTransform function sets the transform in uv parametric space for the shader specified by the shader parameter to the transform specified by the uvTransform parameter. For example, a texture shader that relies on uv values to index a texture mapping can rotate, scale, or translate the texture by setting appropriate values in the uv transform.
You can use the Q3Shader_GetUBoundary function to get the current boundary-handling method for u values that are outside the range 0 to 1.
TQ3Status Q3Shader_GetUBoundary (
TQ3ShaderObject shader,
TQ3ShaderUVBoundary *uBoundary);
The Q3Shader_GetUBoundary function returns, in the uBoundary parameter, the current method used by the shader specified by the shader parameter of handling u values that are outside the range 0 to 1. If Q3Shader_GetUBoundary completes successfully, the uBoundary parameter contains one of these values:
typedef enum TQ3ShaderUVBoundary {
kQ3ShaderUVBoundaryWrap,
kQ3ShaderUVBoundaryClamp
} TQ3ShaderUVBoundary;
You can use the Q3Shader_SetUBoundary function to set the current boundary-handling method for u values that are outside the range 0 to 1.
TQ3Status Q3Shader_SetUBoundary (
TQ3ShaderObject shader,
TQ3ShaderUVBoundary uBoundary);
You can use the Q3Shader_GetVBoundary function to get the current boundary-handling mode for v values that are outside the range 0 to 1.
TQ3Status Q3Shader_GetVBoundary (
TQ3ShaderObject shader,
TQ3ShaderUVBoundary *vBoundary);
The Q3Shader_GetVBoundary function returns, in the vBoundary parameter, the current method used by the shader specified by the shader parameter of handling v values that are outside the range 0 to 1. If Q3Shader_GetVBoundary completes successfully, the vBoundary parameter contains one of these values:
typedef enum TQ3ShaderUVBoundary {
kQ3ShaderUVBoundaryWrap,
kQ3ShaderUVBoundaryClamp
} TQ3ShaderUVBoundary;
You can use the Q3Shader_SetVBoundary function to set the current boundary-handling mode for v values that are outside the range 0 to 1.
TQ3Status Q3Shader_SetVBoundary (
TQ3ShaderObject shader,
TQ3ShaderUVBoundary vBoundary);
Previous | QD3D Book | Overview | Chapter Contents | Next |